<!DOCTYPE html>
<html>
<head>
    

    

    
<!-- Baidu Tongji -->
<script>var _hmt = _hmt || []</script>
<script async src="//hm.baidu.com/hm.js?a7c05ce530152d9866930ef4850ee566"></script>
<!-- End Baidu Tongji -->




    <meta charset="utf-8">
    
    
    
    <title>Redis的主从复制 | 神奇的鸭鸭の码农库 | 新知识要不断的总结记录成笔记，要多写，多画，能够清晰透彻的将知识讲给别人听，才是达到理解的层次。</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="theme-color" content="#765959">
    
    
    <meta name="keywords" content="缓存">
    <meta name="description" content="Redis的主从复制持久化保证了即使redis服务重启也不会丢失数据，因为redis服务重启后会将硬盘上持久化的数据恢复到内存中，但是当redis服务器的硬盘损坏了可能会导致数据丢失，如果通过redis的主从复制机制就可以避免这种单点故障，如下图： 说明：  主redis中的数据有两个副本(replication)即从redis1和从redis2，即使一台redis服务器宕机其他两台redis服务">
<meta name="keywords" content="缓存">
<meta property="og:type" content="article">
<meta property="og:title" content="Redis的主从复制">
<meta property="og:url" content="http://magic_duck.oschina.io/2017/09/06/redis4.4.0_primary_04/index.html">
<meta property="og:site_name" content="神奇的鸭鸭の码农库">
<meta property="og:description" content="Redis的主从复制持久化保证了即使redis服务重启也不会丢失数据，因为redis服务重启后会将硬盘上持久化的数据恢复到内存中，但是当redis服务器的硬盘损坏了可能会导致数据丢失，如果通过redis的主从复制机制就可以避免这种单点故障，如下图： 说明：  主redis中的数据有两个副本(replication)即从redis1和从redis2，即使一台redis服务器宕机其他两台redis服务">
<meta property="og:image" content="http://om6odecqr.bkt.clouddn.com/redis%E4%B8%BB%E4%BB%8E.png">
<meta property="og:updated_time" content="2017-12-05T09:59:13.889Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Redis的主从复制">
<meta name="twitter:description" content="Redis的主从复制持久化保证了即使redis服务重启也不会丢失数据，因为redis服务重启后会将硬盘上持久化的数据恢复到内存中，但是当redis服务器的硬盘损坏了可能会导致数据丢失，如果通过redis的主从复制机制就可以避免这种单点故障，如下图： 说明：  主redis中的数据有两个副本(replication)即从redis1和从redis2，即使一台redis服务器宕机其他两台redis服务">
<meta name="twitter:image" content="http://om6odecqr.bkt.clouddn.com/redis%E4%B8%BB%E4%BB%8E.png">
    
    <link rel="shortcut icon" href="/favicon.ico">
    <link rel="stylesheet" href="/css/style.css?v=1.4.3">
    <script>window.lazyScripts=[]</script>
</head>

<body>
    <div id="loading" class="active"></div>

    <aside id="menu" class="hide" >
  <div class="inner flex-row-vertical">
    <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
        <i class="icon icon-lg icon-close"></i>
    </a>
    <div class="brand-wrap">
      <div class="brand">
        <a href="/" class="avatar waves-effect waves-circle waves-light">
          <img src="/img/avatar.jpg">
        </a>
        <hgroup class="introduce">
          <h5 class="nickname">神奇的鸭鸭</h5>
          <a href="mailto:702038338@qq.com" title="702038338@qq.com" class="mail">702038338@qq.com</a>
        </hgroup>
      </div>
    </div>
    <div class="scroll-wrap flex-col">
      <ul class="nav">
        
            <li class="waves-block waves-effect">
              <a href="/"  >
                <i class="icon icon-lg icon-home"></i>
                主页
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/archives"  >
                <i class="icon icon-lg icon-archives"></i>
                归档
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/tags"  >
                <i class="icon icon-lg icon-tags"></i>
                标签
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://git.oschina.net/magic_duck" target="_blank" >
                <i class="icon icon-lg icon-gg-circle"></i>
                码云
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://www.zhihu.com/people/shen-qi-de-ya-ya" target="_blank" >
                <i class="icon icon-lg icon-twitter"></i>
                知乎
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/404.html"  >
                <i class="icon icon-lg icon-link"></i>
                404页面测试
              </a>
            </li>
        
      </ul>
    </div>
  </div>
</aside>

    <main id="main">
        <header class="top-header" id="header">
    <div class="flex-row">
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
          <i class="icon icon-lg icon-navicon"></i>
        </a>
        <div class="flex-col header-title ellipsis">Redis的主从复制</div>
        
        <div class="search-wrap" id="search-wrap">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
                <i class="icon icon-lg icon-chevron-left"></i>
            </a>
            <input type="text" id="key" class="search-input" autocomplete="off" placeholder="输入感兴趣的关键字">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="search">
                <i class="icon icon-lg icon-search"></i>
            </a>
        </div>
        
        
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menuShare">
            <i class="icon icon-lg icon-share-alt"></i>
        </a>
        
    </div>
</header>
<header class="content-header post-header">

    <div class="container fade-scale">
        <h1 class="title">Redis的主从复制</h1>
        <h5 class="subtitle">
            
                <time datetime="2017-09-05T20:00:00.000Z" itemprop="datePublished" class="page-time">
  2017-09-06
</time>


            
        </h5>
    </div>

    

</header>


<div class="container body-wrap">
    
    <aside class="post-widget">
        <nav class="post-toc-wrap" id="post-toc">
            <h4>TOC</h4>
            <ol class="post-toc"><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#Redis的主从复制"><span class="post-toc-number">1.</span> <span class="post-toc-text">Redis的主从复制</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#主从复制设置"><span class="post-toc-number">2.</span> <span class="post-toc-text">主从复制设置</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#主机配置"><span class="post-toc-number">2.1.</span> <span class="post-toc-text">主机配置</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#从机配置"><span class="post-toc-number">2.2.</span> <span class="post-toc-text">从机配置</span></a></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#主从切换设置"><span class="post-toc-number">3.</span> <span class="post-toc-text">主从切换设置</span></a></li></ol></li><li class="post-toc-item post-toc-level-1"><a class="post-toc-link" href="#参考资料"><span class="post-toc-number"></span> <span class="post-toc-text">参考资料</span></a>
        </nav>
    </aside>
    
<article id="post-redis4.4.0_primary_04"
  class="post-article article-type-post fade" itemprop="blogPost">

    <div class="post-card">
        <h1 class="post-card-title">Redis的主从复制</h1>
        <div class="post-meta">
            <time class="post-time" title="2017年09月06日 4:00" datetime="2017-09-05T20:00:00.000Z"  itemprop="datePublished">2017-09-06</time>

            


            
<span id="busuanzi_container_page_pv" title="文章总阅读量" style='display:none'>
    <i class="icon icon-eye icon-pr"></i><span id="busuanzi_value_page_pv"></span>
</span>


            

        </div>
        <div class="post-content" id="post-content" itemprop="postContent">
            <h2 id="Redis的主从复制"><a href="#Redis的主从复制" class="headerlink" title="Redis的主从复制"></a>Redis的主从复制</h2><p>持久化保证了即使redis服务重启也不会丢失数据，因为redis服务重启后会将硬盘上持久化的数据恢复到内存中，但是当redis服务器的硬盘损坏了可能会导致数据丢失，如果<strong>通过redis的主从复制机制就可以避免这种单点故障</strong>，如下图：<br><img src="http://om6odecqr.bkt.clouddn.com/redis%E4%B8%BB%E4%BB%8E.png" alt="redis主从"></p>
<p>说明：</p>
<ul>
<li>主redis中的数据有两个副本(replication)即从redis1和从redis2，即使一台redis服务器宕机其他两台redis服务也可以继续提供服务。</li>
<li>主redis中数据和从redis上的数据保持实时同步，当主redis写入数据时通过主从复制机制会复制到两个从redis服务上。</li>
<li>只有一个主redis，可以有多个从redis</li>
<li>主从复制不会阻塞master，在同步数据时，master可以继续处理client请求</li>
<li>一个redis可以即是主又是从</li>
</ul>
<hr>
<h2 id="主从复制设置"><a href="#主从复制设置" class="headerlink" title="主从复制设置"></a>主从复制设置</h2><p>由于我只有一台腾讯云乞丐机，所有便通过修改端口来进行模拟配置，具体环境描述：</p>
<ul>
<li>主redis：192.168.10.1 6379</li>
<li>从redis：192.168.10.2 6380</li>
</ul>
<h3 id="主机配置"><a href="#主机配置" class="headerlink" title="主机配置"></a>主机配置</h3><p>无需配置</p>
<h3 id="从机配置"><a href="#从机配置" class="headerlink" title="从机配置"></a>从机配置</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div></pre></td><td class="code"><pre><div class="line"><span class="meta">#</span> 第一步 复制出一个从机</div><div class="line">[root@VM_122_1_centos redis4.0.1]# cp bin/ bin2 –r</div><div class="line"></div><div class="line"><span class="meta">#</span> 第二步 修改从机的redis.conf</div><div class="line"><span class="meta">#</span> 下边的配置说明当前该【从redis服务器】所对应的【主redis服务器】的IP是192.168.101.3，端口是6379。</div><div class="line"><span class="meta">#</span> slaveof &lt;masterip&gt; &lt;masterport&gt;</div><div class="line">slaveof 127.0.0.1 6379</div><div class="line"></div><div class="line"><span class="meta">#</span> 第三步 修改从机的port地址为6380</div><div class="line"><span class="meta">#</span> If port 0 is specified Redis will not listen on a TCP socket.</div><div class="line">port 6380</div><div class="line"></div><div class="line"><span class="meta">#</span> 第四步 清除复制过来的从机中的持久化文件，避免数据错误</div><div class="line">[root@VM_122_1_centos bin2]# rm -rf dump.rdb appendonly.aof</div><div class="line"></div><div class="line"><span class="meta">#</span> 第五步 启动从机</div><div class="line">[root@VM_122_1_centos bin2]# ./redis-server redis.conf </div><div class="line"></div><div class="line"><span class="meta">#</span> 第六步 启动6380的从redis服务器</div><div class="line">[root@VM_122_1_centos bin2]# ./redis-cli -p 6380</div><div class="line"></div><div class="line"><span class="meta">#</span> 第七步 测试</div><div class="line"><span class="meta">#</span># 主机一旦发生增删改操作，那么从机会将数据同步到从机中</div><div class="line">127.0.0.1:6380&gt; get s1</div><div class="line">"aaa"</div><div class="line"><span class="meta">#</span># 从机不能执行写操作</div><div class="line">127.0.0.1:6380&gt; set s2 222</div><div class="line">(error) READONLY You can't write against a read only slave.'</div><div class="line"></div><div class="line"><span class="meta">#</span> 查看进程状况</div><div class="line">[root@VM_122_1_centos bin2]# ps -aux | grep redis</div><div class="line">root     12757  0.0  0.9 147292  9752 ?        Ssl  20:22   0:00 ./redis-server 0.0.0.0:6379</div><div class="line">root     13077  0.0  0.9 147292  9688 ?        Ssl  20:26   0:00 ./redis-server 0.0.0.0:6380</div></pre></td></tr></table></figure>
<hr>
<h2 id="主从切换设置"><a href="#主从切换设置" class="headerlink" title="主从切换设置"></a>主从切换设置</h2><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div></pre></td><td class="code"><pre><div class="line"><span class="meta">#</span> 第一步 停止主redis</div><div class="line">[root@VM_122_1_centos bin]# ./redis-cli -n 6379 shutdown</div><div class="line">[root@VM_122_1_centos bin]# ./redis-cli -p 6379 shutdown</div><div class="line"></div><div class="line"><span class="meta">#</span> 第二步 将从redis设曾主redis</div><div class="line">[root@VM_122_1_centos bin2]# ./redis-cli -p 6380 slaveof NO ONE</div><div class="line">OK</div><div class="line"></div><div class="line"><span class="meta">#</span> 第三步 测试从redis是否切换主redis</div><div class="line">[root@VM_122_1_centos bin2]# ./redis-cli -p 6380</div><div class="line">127.0.0.1:6380&gt; set s2 222</div><div class="line">OK</div><div class="line"></div><div class="line"><span class="meta">#</span> 如果原来的主redis恢复正常了，要重新切换回去</div><div class="line"><span class="meta">#</span># 第一步 将现在的主redis数据进行保存</div><div class="line"><span class="meta">#</span># ...各种读写操作后</div><div class="line">127.0.0.1:6380&gt; save</div><div class="line">OK</div><div class="line">127.0.0.1:6380&gt; quit</div><div class="line"></div><div class="line"><span class="meta">#</span># 第二步 将现在的主redis根目录下的dump.rdb文件和appendonly.aof文件拷贝覆盖原来的主redis的根目录</div><div class="line">[root@VM_122_1_centos bin2]# cp appendonly.aof ../bin/appendonly.aof </div><div class="line">cp: overwrite ‘../bin/appendonly.aof’? y</div><div class="line">[root@VM_122_1_centos bin2]# cp dump.rdb ../bin/dump.rdb </div><div class="line">cp: overwrite ‘../bin/dump.rdb’? y</div><div class="line"></div><div class="line"><span class="meta">#</span># 第三步 启动原来的主redis</div><div class="line">[root@VM_122_1_centos bin]# ./redis-server redis.conf </div><div class="line"></div><div class="line"><span class="meta">#</span># 第四步 在现在的主redis中切换</div><div class="line">[root@VM_122_1_centos bin2]# ./redis-cli -p 6380 slaveof 127.0.0.1 6379</div><div class="line">OK</div></pre></td></tr></table></figure>
<h1 id="参考资料"><a href="#参考资料" class="headerlink" title="参考资料"></a>参考资料</h1><p>Redis主从自动恢复配置：<a href="http://blog.csdn.net/zkaipmoo/article/details/12537151" target="_blank" rel="external">http://blog.csdn.net/zkaipmoo/article/details/12537151</a></p>

        </div>

        <blockquote class="post-copyright">
    <div class="content">
        
<span class="post-time">
    最后更新时间：<time datetime="2017-12-05T09:59:13.889Z" itemprop="dateUpdated">2017年12月5日 17:59</time>
</span><br>


        如要转载请注明出处：<a href="/2017/09/06/redis4.4.0_primary_04/" target="_blank" rel="external">http://magic_duck.oschina.io/2017/09/06/redis4.4.0_primary_04/</a>
    </div>
    <footer>
        <a href="http://magic_duck.oschina.io">
            <img src="/img/avatar.jpg" alt="神奇的鸭鸭">
            神奇的鸭鸭
        </a>
    </footer>
</blockquote>

        
<div class="page-reward">
    <a id="rewardBtn" href="javascript:;" class="page-reward-btn waves-effect waves-circle waves-light">赏</a>
</div>



        <div class="post-footer">
            
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/缓存/">缓存</a></li></ul>


            
<div class="page-share-wrap">
    

<div class="page-share" id="pageShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://magic_duck.oschina.io/2017/09/06/redis4.4.0_primary_04/&title=《Redis的主从复制》 — 神奇的鸭鸭の码农库&pic=http://magic_duck.oschina.io/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://magic_duck.oschina.io/2017/09/06/redis4.4.0_primary_04/&title=《Redis的主从复制》 — 神奇的鸭鸭の码农库&source=" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://magic_duck.oschina.io/2017/09/06/redis4.4.0_primary_04/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《Redis的主从复制》 — 神奇的鸭鸭の码农库&url=http://magic_duck.oschina.io/2017/09/06/redis4.4.0_primary_04/&via=http://magic_duck.oschina.io" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://magic_duck.oschina.io/2017/09/06/redis4.4.0_primary_04/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>



    <a href="javascript:;" id="shareFab" class="page-share-fab waves-effect waves-circle">
        <i class="icon icon-share-alt icon-lg"></i>
    </a>
</div>



        </div>
    </div>

    
<nav class="post-nav flex-row flex-justify-between">
  
    <div class="waves-block waves-effect prev">
      <a href="/2017/09/07/redis4.4.0_primary_05/" id="post-prev" class="post-nav-link">
        <div class="tips"><i class="icon icon-angle-left icon-lg icon-pr"></i> Prev</div>
        <h4 class="title">Redis集群</h4>
      </a>
    </div>
  

  
    <div class="waves-block waves-effect next">
      <a href="/2017/09/06/redis4.4.0_primary_03/" id="post-next" class="post-nav-link">
        <div class="tips">Next <i class="icon icon-angle-right icon-lg icon-pl"></i></div>
        <h4 class="title">Redis持久化方案</h4>
      </a>
    </div>
  
</nav>



    







</article>

<div id="reward" class="page-modal reward-lay">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <h3 class="reward-title">
        <i class="icon icon-quote-left"></i>
        我只要一角钱~ ~
        <i class="icon icon-quote-right"></i>
    </h3>
    <ul class="reward-items">
        
        <li>
            <img src="/img/wechat.png" title="微信打赏二维码" alt="微信打赏二维码">
            <p>微信</p>
        </li>
        

        
        <li>
            <img src="/img/alipay.jpg" title="支付宝打赏二维码" alt="支付宝打赏二维码">
            <p>支付宝</p>
        </li>
        
    </ul>
</div>



</div>

        <footer class="footer">
    <div class="top">
        
<p>
    <span id="busuanzi_container_site_uv" style='display:none'>
        站点总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style='display:none'>
        站点总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


        <p>
            <span><a href="" target="_blank" class="rss" title="rss"><i class="icon icon-lg icon-rss"></i></a></span>
            <span>博客内容遵循 <a href="http://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">知识共享 署名 - 非商业性 - 相同方式共享 4.0协议</a></span>
        </p>
    </div>
    <div class="bottom">
        <p>
            <span>Power by <a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://git.oschina.net/z77z" target="_blank">邹海清</a></span>
            <span>神奇的鸭鸭の码农库 &copy; 2017</span>
        </p>
    </div>
</footer>

    </main>
    <div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>



<div class="global-share" id="globalShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://magic_duck.oschina.io/2017/09/06/redis4.4.0_primary_04/&title=《Redis的主从复制》 — 神奇的鸭鸭の码农库&pic=http://magic_duck.oschina.io/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://magic_duck.oschina.io/2017/09/06/redis4.4.0_primary_04/&title=《Redis的主从复制》 — 神奇的鸭鸭の码农库&source=" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://magic_duck.oschina.io/2017/09/06/redis4.4.0_primary_04/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《Redis的主从复制》 — 神奇的鸭鸭の码农库&url=http://magic_duck.oschina.io/2017/09/06/redis4.4.0_primary_04/&via=http://magic_duck.oschina.io" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://magic_duck.oschina.io/2017/09/06/redis4.4.0_primary_04/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>


<div class="page-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <img src="//api.qrserver.com/v1/create-qr-code/?data=http://magic_duck.oschina.io/2017/09/06/redis4.4.0_primary_04/" alt="微信分享二维码">
</div>




    <script src="//cdn.bootcss.com/node-waves/0.7.4/waves.min.js"></script>
<script>
var BLOG = { ROOT: '/', SHARE: true, REWARD: true };



lazyScripts.push('//s95.cnzz.com/z_stat.php?id=1261081671&web_id=1261081671')

</script>

<script src="/js/main.min.js?v=1.4.3"></script>


<div class="search-panel" id="search-panel">
    <ul class="search-result" id="search-result"></ul>
</div>
<template id="search-tpl">
<li class="item">
    <a href="{path}" class="waves-block waves-effect">
        <div class="title ellipsis" title="{title}">{title}</div>
        <div class="flex-row flex-middle">
            <div class="tags ellipsis">
                {tags}
            </div>
            <time class="flex-col time">{date}</time>
        </div>
    </a>
</li>
</template>

<script src="/js/search.min.js?v=1.4.3" async></script>






<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>


</body>
</html>
